package com.jj.spb.spring_boot_mybatis.repository;

import com.jj.spb.spring_boot_mybatis.entity.VoteResult;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface VoteResultRepository extends JpaRepository<VoteResult,Integer> {

    Optional<List<VoteResult>> findAllByVoteId(long id);

    int findIdByVoteIdAndStudentId(long voteId,int studentId);
}
